package com.example.demo.controller;

import com.example.demo.entity.UserEntity;
import com.example.demo.service.MyFristMybatisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MyFristMybatisController {

    @Autowired
    private MyFristMybatisService myFristMybatisService;


    @RequestMapping("/gerUser")
    public String getUser() {
        UserEntity userEntity = new UserEntity();

        List<UserEntity> userEntityList = myFristMybatisService.queryUserList(userEntity);
        return userEntityList.toString();
    }
}
